using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class InviteFriendOpen : GeneratedMessageLite<InviteFriendOpen, InviteFriendOpen.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<InviteFriendOpen, InviteFriendOpen.Builder>
		{
			private bool resultIsReadOnly;
			private InviteFriendOpen result;
			protected override InviteFriendOpen.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override InviteFriendOpen MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override InviteFriendOpen DefaultInstanceForType
			{
				get
				{
					return InviteFriendOpen.DefaultInstance;
				}
			}
			public string UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public uint FriendType
			{
				get
				{
					return this.result.FriendType;
				}
				set
				{
					this.SetFriendType(value);
				}
			}
			public Builder()
			{
				this.result = InviteFriendOpen.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(InviteFriendOpen cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private InviteFriendOpen PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					InviteFriendOpen other = this.result;
					this.result = new InviteFriendOpen();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override InviteFriendOpen.Builder Clear()
			{
				this.result = InviteFriendOpen.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override InviteFriendOpen.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new InviteFriendOpen.Builder(this.result);
				}
				return new InviteFriendOpen.Builder().MergeFrom(this.result);
			}
			public override InviteFriendOpen BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override InviteFriendOpen.Builder MergeFrom(IMessageLite other)
			{
				if (other is InviteFriendOpen)
				{
					return this.MergeFrom((InviteFriendOpen)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override InviteFriendOpen.Builder MergeFrom(InviteFriendOpen other)
			{
				return this;
			}
			public override InviteFriendOpen.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override InviteFriendOpen.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(InviteFriendOpen._inviteFriendOpenFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = InviteFriendOpen._inviteFriendOpenFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 10u)
					{
						if (num3 != 16u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasFriendType = input.ReadUInt32(ref this.result.friendType_);
						}
					}
					else
					{
						this.result.hasUserName = input.ReadString(ref this.result.userName_);
					}
				}
				return this;
			}
			public InviteFriendOpen.Builder SetUserName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public InviteFriendOpen.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = "";
				return this;
			}
			public InviteFriendOpen.Builder SetFriendType(uint value)
			{
				this.PrepareBuilder();
				this.result.hasFriendType = true;
				this.result.friendType_ = value;
				return this;
			}
			public InviteFriendOpen.Builder ClearFriendType()
			{
				this.PrepareBuilder();
				this.result.hasFriendType = false;
				this.result.friendType_ = 0u;
				return this;
			}
		}
		public const int UserNameFieldNumber = 1;
		public const int FriendTypeFieldNumber = 2;
		private static readonly InviteFriendOpen defaultInstance;
		private static readonly string[] _inviteFriendOpenFieldNames;
		private static readonly uint[] _inviteFriendOpenFieldTags;
		private bool hasUserName;
		private string userName_ = "";
		private bool hasFriendType;
		private uint friendType_;
		private int memoizedSerializedSize = -1;
		public static InviteFriendOpen DefaultInstance
		{
			get
			{
				return InviteFriendOpen.defaultInstance;
			}
		}
		public override InviteFriendOpen DefaultInstanceForType
		{
			get
			{
				return InviteFriendOpen.DefaultInstance;
			}
		}
		protected override InviteFriendOpen ThisMessage
		{
			get
			{
				return this;
			}
		}
		public string UserName
		{
			get
			{
				return this.userName_;
			}
		}
		public uint FriendType
		{
			get
			{
				return this.friendType_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasFriendType;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeStringSize(1, this.UserName);
				}
				if (this.hasFriendType)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.FriendType);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private InviteFriendOpen()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] inviteFriendOpenFieldNames = InviteFriendOpen._inviteFriendOpenFieldNames;
			if (this.hasUserName)
			{
				output.WriteString(1, inviteFriendOpenFieldNames[1], this.UserName);
			}
			if (this.hasFriendType)
			{
				output.WriteUInt32(2, inviteFriendOpenFieldNames[0], this.FriendType);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			if (this.hasFriendType)
			{
				num ^= this.friendType_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			InviteFriendOpen inviteFriendOpen = object_0 as InviteFriendOpen;
			return inviteFriendOpen != null && (this.hasUserName == inviteFriendOpen.hasUserName && (!this.hasUserName || this.userName_.Equals(inviteFriendOpen.userName_))) && (this.hasFriendType == inviteFriendOpen.hasFriendType && (!this.hasFriendType || this.friendType_.Equals(inviteFriendOpen.friendType_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<InviteFriendOpen, InviteFriendOpen.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
			GeneratedMessageLite<InviteFriendOpen, InviteFriendOpen.Builder>.PrintField("FriendType", this.hasFriendType, this.friendType_, writer);
		}
		public static InviteFriendOpen ParseFrom(byte[] data)
		{
			return InviteFriendOpen.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private InviteFriendOpen MakeReadOnly()
		{
			return this;
		}
		public static InviteFriendOpen.Builder CreateBuilder()
		{
			return new InviteFriendOpen.Builder();
		}
		public override InviteFriendOpen.Builder ToBuilder()
		{
			return InviteFriendOpen.CreateBuilder(this);
		}
		public override InviteFriendOpen.Builder CreateBuilderForType()
		{
			return new InviteFriendOpen.Builder();
		}
		public static InviteFriendOpen.Builder CreateBuilder(InviteFriendOpen prototype)
		{
			return new InviteFriendOpen.Builder(prototype);
		}
		static InviteFriendOpen()
		{
			InviteFriendOpen.defaultInstance = new InviteFriendOpen().MakeReadOnly();
			InviteFriendOpen._inviteFriendOpenFieldNames = new string[]
			{
				"FriendType",
				"UserName"
			};
			InviteFriendOpen._inviteFriendOpenFieldTags = new uint[]
			{
				16u,
				10u
			};
			object.ReferenceEquals(micromsg.Proto.InviteFriendOpen.Descriptor, null);
		}
	}
}
